Software Update¶
The Debian system provides the apt tool for software package management.
Software Repository Configuration¶
The /etc/apt/sources.list file stores the software repository configuration. You can select a faster software repository based on your geographical location.
Official Debian Repository
deb https://deb.debian.org/debian trixie main contrib non-free non-free-firmware
deb https://deb.debian.org/debian trixie-backports main contrib non-free non-free-firmware
deb https://deb.debian.org/debian trixie-updates main contrib non-free non-free-firmware
deb https://deb.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
deb-src https://deb.debian.org/debian trixie main contrib non-free non-free-firmware
deb-src https://deb.debian.org/debian trixie-backports main contrib non-free non-free-firmware
deb-src https://deb.debian.org/debian trixie-updates main contrib non-free non-free-firmware
deb-src https://deb.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
USTC Software Repository:
deb https://mirrors.ustc.edu.cn/debian trixie main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian trixie-backports main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian trixie-updates main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian trixie main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian trixie-backports main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian trixie-updates main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware
Update Package Cache¶
Run the following command to update the local package repository cache:
sudo apt update
Update Installed Software¶
You can choose to update a specific package or update all upgradable packages in the system.
Update a specific package:
sudo apt install <package_name>
If the package is already installed and a newer version is available in the configured repository, this command will automatically install the newer version.
Update all upgradable packages in the system:
sudo apt upgrade
Install Software¶
Install a package using:
sudo apt install <package_name>
Uninstall Software¶
Uninstall a package using:
sudo apt purge <package_name>
Note: When uninstalling software, related dependent packages may also be removed. Removing critical system packages may cause desktop display issues or other system problems. If the packages listed by apt purgeare not what you expect to remove, press Ctrl+C to cancel the operation and avoid damaging the system.